const phoneRegex = /^1(3[0-9]|4[5,7]|5[0,1,2,3,5,6,7,8,9]|6[2,5,6,7]|7[0,1,7,8]|8[0-9]|9[1,8,9])\d{8}$/

const emailRegex = /^([a-zA-Z]|[0-9])(\w|-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/

const specialTextRegex = /\//im

export function isPhone (phoneNumber = '') {
  return phoneRegex.test(phoneNumber)
}

export function isEmail (email: string) {
  return emailRegex.test(email)
}

export function isNormalText (text: string) {
  return !specialTextRegex.test(text)
}
